package com.szrt.day20170419.interfaces.ch02;


import org.junit.Test;

public class CalTest {
	
	@Test
	public void addSaozhouTest() throws Exception {
		Cal cal = new Cal();
		
		Saozhou saozhou = new Saozhou();
		saozhou.setX(200);
		saozhou.setY(300);
		
		System.out.println(cal.add(saozhou));
		
		
		
	}
	@Test
	public void addCarTest() throws Exception {
		Cal cal = new Cal();
		
		Car car = new Car();
		car.setX(20);
		car.setY(30);
		
		System.out.println(cal.add(car));
		
		
		
	}
	@Test
	public void addCarriageTest() throws Exception {
		Cal cal = new Cal();
		
		Carriage carriage = new Carriage();
		carriage.setX(20);
		carriage.setY(30);
		
		System.out.println(cal.add(carriage));
		
		
		
	}
	
	
	@Test
	public void addTest01() throws Exception {
		Cal cal = new Cal();
		
		int sum  =cal.add(10, 20);
		System.out.println(sum);
		
	}

}
